<?php

namespace App\Http\Controllers\Client;

use App\Http\Controllers\Controller;
use App\Services\RedPackService;
use App\Utils\WxUtil;

class TestController extends Controller
{
    //
    public function addRedPack()
    {
        $redPackService = new RedPackService();
        $res = $redPackService->addMemberRedPack(1, 200, 1, 1, 1);
        dd($res);
    }

    public function with()
    {
        try {
            // 实例化服务层
            $serviceTransfer = new WxUtil();
            // 带参请求：sOpenid（收款方openid）   nMoney（转账金额）
            $result          = $serviceTransfer->transfer_batches('o34WE6_vK_vRR4d2_ebD1XUWDU8w', 100);
            return $result;
        } catch (\Exception $e) {
            dd($e->getMessage());
        }
    }
}
